package iscript.coreFramework.math 
{
	import flash.display.Graphics;
	/**
	 * ...
	 * @author raymond
	 */
	public class Segment2D 
	{
		
		public function Segment2D(x0:Number,y0:Number,x1:Number,y1:Number) 
		{
			_x0 = x0;
			_x1 = x1;
			_y0 = y0;
			_y1 = y1;
		}
		
		
		private var _x0:Number;
		private var _x1:Number;		
		private var _y0:Number;
		private var _y1:Number;
		
		public function length():Number {
			var dx:Number = _x1 - _x0;
			var dy:Number = _y1 -_y0;
			return  Math.sqrt(dx*dx + dy*dy);
		}
		
		public function draw (graphics:Graphics, color:uint = 0):void {
            graphics.lineStyle (0, color);
            graphics.moveTo (_x0, _y0);
            graphics.lineTo (_x1, _y1);
         }


        public function getAngle():Number {
			return 0
			}
		
		
		
	}

}